import {ErrorMessageMode} from "#/axios";

import { orgAxios } from '@/utils/http/axios';


// 定义接口地址
enum Api {
  /** 搜索 */
  SEARCH = 'https://api.iconify.design/search',
}

export async function search(keywords:string, mode: ErrorMessageMode = 'message'){
  let data:any = {};
  await orgAxios.get(Api.SEARCH, {
    params: {limit:999, query:keywords}
  }).then((res:any)=>{
    data = res.data;
  });
  return {icons:data.icons, total:data.total};
}
